package com.liwy3.seckill.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 秒杀库存表
 * </p>
 *
 * @author Crazy4J
 * @since 2022-03-10
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("seckill")
public class SeckillEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 商品库存id
     */
    @TableId(value = "seckill_id", type = IdType.AUTO)
    private Long seckillId;

    /**
     * 商品名称
     */
    @TableField("name")
    private String name;

    /**
     * 库存数量
     */
    @TableField("number")
    private Integer number;

    /**
     * 秒杀开启时间
     */
    @TableField("start_time")
    private LocalDateTime startTime;

    /**
     * 秒杀结束时间
     */
    @TableField("end_time")
    private LocalDateTime endTime;

    /**
     * 创建时间
     */
    @TableField("create_time")
    private LocalDateTime createTime;

    /**
     * 版本号
     */
    @TableField("version")
    private Integer version;


    public static final String SECKILL_ID = "seckill_id";

    public static final String NAME = "name";

    public static final String NUMBER = "number";

    public static final String START_TIME = "start_time";

    public static final String END_TIME = "end_time";

    public static final String CREATE_TIME = "create_time";

    public static final String VERSION = "version";

}
